<body>
  <div id="root">
    <input type="text" value="1" />
    <input type="text" value="4" />
    {{num}}
  </div>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.global.prod.js"></script>
  <script src="https://unpkg.com/@vueuse/shared"></script>
  <script src="https://unpkg.com/@vueuse/core"></script>
  <script>
    const { useActiveElement } = VueUse;
    const { createApp, watch, ref } = Vue;
    const App = {
      setup() {
        const activeElement = useActiveElement();
        const num = ref("null");
        watch(activeElement, (el) => {
          num.value = el.value;
        });
        return {
          num,
        };
      },
    };
    const app = Vue.createApp(App);
    app.mount("#root");
  </script>
</body>
